musicbeefandomcom-20200215-history
How to Create a File-Naming Template
Author: redwing Key Principles Sure, you can name your music files with a bunch of meaningless numbers and store all of them in one big folder as long as you are able to manage them with their tags. But problems will soon arise when you're trying to locate and play a song outside a music player. And more often than not you will be forced to manage those files to fix some problems, and you would probably want to see more info on their path and filename. On the other hand, you don't have to organize your files more meticulously than necessary. Most of the time you will be playing them from a music player rather than from their folder; your collection keeps growing and changing, often demanding a different organizing rule. Here are some key principles I'd think to keep in mind with regard to naming templates. *Make the folder structure practically useful to your pattern of accessing and managing files. *Keep filename as simple and short as possible. *Avoid any duplicate names for files within the same folder. *It doesn't matter, on the other hand, for the template to be lengthy and complicated to do the job. Handling of Missing Tags Let's start with MB's default template. \\ This means your music files will be stored with the following path: Adele\21\01-11 Someone like You.mp3 If you don't tag disc# for a single disc album, then: Adele\21\11 Someone like You.mp3 What if the track has no track# tag either? In that case: Adele\21\# Someone like You.mp3 If the track has no tag either; then it gets the following path: Adele\Unknown Album\# Someone like You.mp3 This is why "do not re-organize files with missing tags" option is by default ticked for file organization dialog. Now, you want to make field blank when the tag value doesn't exist, then put this: \\$IsNull(,, " ") " " means it would insert a space between Disc-Track# and Title when the value is present. This will give you the following path: Adele\21\Someone like You.mp3 If you want to do the same thing for album: \$IsNull(,,)\$IsNull(,, " ") then it will give you the following path with no sub-folder for if the tag doesn't exist: Adele\Someone like You.mp3 Splitting Your Collection to Big Genres Now, do you want your folder structure to start with an artist name or some big genres? If you want every track start with its own , then it's easy: \\\ But not sure how useful that structure could be with tens of genres. If you're like me and want to split the collection to two big folders, Classical and Pop(all the others), then use this in place of : $If(="Classical","Classical","Pop") Then all classical music tracks would start with \Classical\ path while all other tracks start with \Pop\ path. What if you want to split it to three, Classical, Jazz and Pop?: $If(="Classical","Classical",$If(="Jazz","Jazz","Pop")) Now you got the idea. With the nested $If conditions, you can split your collection to as many genres as you like. Different Template for Each Big Genre Then why would you want, in the first place, to split your collection to a few big genres? Obviously it will keep your files of the same big genre get stored together in a big folder. But, more important, it will allow you to use a different file-naming template for each big genre. For an average collection of popular music, MB's default template would be more than enough. But that wouldn't do much good for classical music where all album names and track titles look just the same for most standard repertoire and where it's not uncommon for the same conductor(album artist) performing a piece of music several times with the same title and the same album name. Now you want to use completely different template for classical and pop music tracks. Then use this sort of pattern: $If(="Classical","Classical\\\\ ","Pop\\\ ") It will use "Classical\\\\ " template for classical music and MB's default template following \Pop\ path for popular music. On the other hand, if you want to make just a small difference in path, use this pattern instead: $If(="Classical","Classical","Pop")\\$If(="Classical",,)\\ This will make the two genre starting with \Classical\ and \Pop\ but the rest would be the same except that sub-folder will be inserted only to classical music tracks. What to Use among Album Artist, Artist, and First Artist? (1) What would the differences be between using and using for the template? For the tracks with the same values for the two tags, obviously there would be no differences. It's the same for users who do not use field and keep the field blank (Virtual tags cannot see a blank field. It's immediately filled with value). It makes differences only when value and values are different, mostly with compilation albums and "Various Artists." Let's see the differences with the following example: \\ Various Artists\Almost Alice\01 Alice.mp3 With this, the filename gives you no idea about who the artist is. \\ Avril Lavigne\Almost Alice\01 Alice.mp3 Now you can see who the artist is. But this template will split all albums with different artists into different folders. How about the following? $If(=,,)\\ This will use as long as the value is the same with , otherwise uses . What? Actually this means nothing. It's the same as the template just above since it always uses value for the first path. Now you don't want to split albums with different artists except for compilation albums: $If(="Various Artists", ,)\\ This will use for all tracks without splitting albums with the different artists, but for compilation albums with Various Artists it will split them using path instead. What to Use among Album Artist, Artist, and First Artist? (2) Now you know the differences between and in file-naming template, and you feel like would suit your collection better. At this point, you must think about how many artists are tagged for an average track in your collection. This would make huge differences especially to the length of path in case you're frequently tagging tracks with multiple artists with long names. It's not uncommon to classical music collection that several ensembles with lengthy names are used as multiple artists. So when the following gives you this lengthy path: Carlo Maria Giulini; Philharmonia Orchestra; Philharmonia Chorus You might want to use first artist only: $First() Carlo Maria Giulini Or first & second artists only: $First()$IsNull($Split(,";",2),,"; "$Split(,";",2)) Carlo Maria Giulini; Philharmonia Orchestra Handling of "The" It always gives you a headache when you're trying to sort artists by their names, but those names starting with article "The" or "A" just won't be sorted correctly. Fortunately that shouldn't be a problem for any MB user thanks to "ignore words" option under Tags (2) settings. If you put some words in there, then you can make any virtual tags and the file-naming template to respect the setting by using $Sort function. The Alan Parsons Project $Sort() Alan Parsons Project, The What does this mean to users who just want to use MB's default template? It would be better to use the followings than the default in case any of your artist has name starting with an article: $Sort()\\ or $Sort()\\ Grouping Folders with First Letter It might look better and practically useful if you're grouping artist name folders with its first letter; of course, you don't have to. In case you want that grouping folder, use this: $Group($Sort(),1) Why use $Sort() instead of ? That's for "The Alan Parsons Project," $Group(,1) would return "T", whereas $Group($Sort(),1) would return "A" instead. When you want to group folders for first artist: $Group($Sort($First()),1) Tips for Shortening Tag Values So far most key points were covered. Now it won't be hard for you to modify this default template of MB: \\ The Alan Parsons Project\The Collection\# Eye in the Sky.mp3 into something like this: $If(="Classical","Classical","Pop")\$Group($Sort(),1)\$Sort()\\$IsNull(,, " ") Pop\A\Alan Parsons Project, The\The Collection\Eye in the Sky.mp3 One important point is you'd better keep any track's path not exceeding 260 characters: http://getmusicbee.com/forum/index.php?topic=9317.msg66715#msg66715 Then how to shorten tag values while avoiding duplicate names? There can be numerous ways. Just list a few: * Limiting the number of characters for a specific tag $Left(,50)\ $Left( ,50) This will use first 50 characters only both for and field * Using first artist only instead of using multiple artists $First() * Using unique value fields that can help avoid duplicate filenames \\\ * Using multiple $Split function to shorten tag values $Split($Split($Split(,";",1),"/",1),"&",1) This would use a string before any of ";" "/" "&" characters for path. Category:Guides Category:File Management Category:Organizing